package com.example.jpa.entity;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.FieldNameConstants;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.*;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * @author  qilongxin
 * @date 2021/08/25 22:54 
 */

@DynamicInsert
@DynamicUpdate
@Data
@FieldNameConstants
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Entity
@Table (name = "student_inf")
public class StudentInf implements Serializable {

	private static final long serialVersionUID =  5015408096699688947L;

	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
   	@Column(name = "student_id")
	private Long studentId;

   	@Column(name = "name")
	private String name;

   	@Column(name = "english_name")
	private String englishName;

   	@Column(name = "age")
	private Integer age;

   	@Column(name = "address")
	private String address;

   	@Column(name = "gender")
	private String gender;

   	@Column(name = "clazz_code")
	private Long clazzCode;

	@Column(name = "create_time")
	private LocalDateTime createTime;

}
